package d.i;

import d.f.r;
import java.util.NoSuchElementException;

public final class b extends r {

    /* renamed from: b  reason: collision with root package name */
    private final int f2704b;

    /* renamed from: c  reason: collision with root package name */
    private boolean f2705c;

    /* renamed from: d  reason: collision with root package name */
    private int f2706d;
    private final int e;

    public b(int i, int i2, int i3) {
        this.e = i3;
        this.f2704b = i2;
        boolean z = true;
        if (i3 <= 0 ? i < i2 : i > i2) {
            z = false;
        }
        this.f2705c = z;
        this.f2706d = !z ? this.f2704b : i;
    }

    public int b() {
        int i = this.f2706d;
        if (i != this.f2704b) {
            this.f2706d = this.e + i;
        } else if (this.f2705c) {
            this.f2705c = false;
        } else {
            throw new NoSuchElementException();
        }
        return i;
    }

    public boolean hasNext() {
        return this.f2705c;
    }
}
